/**
* @file retcodes.h
* @brief 返回码
* @author chenxiaole
* @version 1.0.0
* @date 2018-03-27
*/
#ifndef _RETCODES_H_
#define _RETCODES_H_

/*
*服务器C++错误码规则：-10000~-999999
*客户端错误码建议从正数10000开始,
*/

namespace common
{
	enum ELogicReturnCode
	{
		SUCCEED = 0,		// 成功的返回码
		WAITING = 1,
		ERR_UNKNOWN = 2,	// 未知错误
		SERVER_WAITING = 3,	// 服务器使用，不推给客户端

		ESERVICE_SIGNAL_USR1_ASKED = -1000,	// /**<收到user1信号退出  */
		ERR_SESSION_FUN_IS_NULL = -1001,//sessionfun是空的
		ERR_INVAILD_PARAM = -1002,
		ESERVER_CREATE_SOCKET_FAIL = -1003,
		ESERVER_NOCHANNEL = -1004,
		ENETEVENT_START_ILLEGALPARAM = -1005,
		ENETEVENT_REGISTER_INVALID_FD = -1006,
		ENETEVENT_UNREGISTER_INVALID_FD = -1007,
		ECLIENT_ALREADY_CONNECTED = -1008,
		ECLIENT_CREATE_SOCKET_FAIL = -1009,
		ECHANNEL_SEND_BLOCK = -1010,
		ECHANNEL_SEND_ERROR = -1011,
		ENETEVENT_EPOLLFD_CREATE_FAIL = -1012,
		ENETEVENT_CTLADD_FAIL = -1013,
		ENETEVENT_CTLDEL_FAIL = -1014,
		ESERVER_ALREADY_STARTED = -1015,
		ESERVER_REUSE_ADDR_FAIL = -1016,
		ESERVER_NODELAY_FAIL = -1017,
		ESERVER_NONBLOCK_FAIL = -1018,
		ESERVER_SET_SNDBUF_FAIL = -1019,
		ESERVER_SET_RCVBUF_FAIL = -1020,
		ESERVER_BIND_FAIL = -1021,
		ESERVER_LISTEN_FAIL = -1022,
		ERINGSTREAM_ALREADY_INIT = -1023,
		ERINGSTREAM_MKSTEMP_FAIL = -1024,
		ERINGSTREAM_UNLINK_FAIL = -1025,
		ERINGSTREAM_FTRUNCATE_FAIL = -1026,
		ERINGSTREAM_MAP_FAIL1 = -1027,
		ERINGSTREAM_MAP_FAIL2 = -1028,
		ERINGSTREAM_MAP_FAIL3 = -1029,
		ERINGSTREAM_CLOSE_FD_FAIL = -1030,
		ERINGSTREAM_MUNMAP_FAIL = -1031,
		ECLIENT_CONNECT_FAIL = -1032,
		ECLIENT_NODELAY_FAIL = -1033,
		ECLIENT_NONBLOCK_FAIL = -1034,
		ECLIENT_SET_SNDBUF_FAIL = -1035,
		ECLIENT_SET_RCVBUF_FAIL = -1036,

		ERR_CREATE_ROLE_NAME_FAILD = -2000, //创建角色名称失败
		ERR_CHECK_ACCOUNT_PLAYERINFO_ERR	= -2001,	//检查玩家账号时玩家信息出错
		ERR_LOGIN_IS_LOGINING = -2002,	// 玩家已经再登陆了
		ERR_LOGIN_CREATE_DATE_ERR = -2003,	// 创建登陆数据错误

		ERR_LOGIN_NAME_LENGTH_ERR = -2004, // 名字长度超出最大值
		ERR_LOGIN_ACCOUNTID_ERR = -2005, // 账号ID错误
		ERR_LOGIN_NAME_DIRTYWORD_ERR = -2006, // 名字中含有脏词
		ERR_LOGIN_CREATE_HAS_PLAYER = -2007, // 已经有角色了，请直接登陆
		ERR_LOGIN_CREATE_HAS_NAME = -2008, // 已经有该角色名称了，请换别的名字
		ERR_LOGIN_CREATE_DB_ERR = -2009,//创建角色mysql插入错误
		ERR_LOGIN_CREATE_PLAYER_INFO_ERR = -2010, // 创建玩家离线信息错误
		ERR_LOGIN_CREATE_PLAYER_ERR = -2011, // 创建在线玩家错误
		ERR_LOGIN_CREATE_HASNOTPLAYER = -2012, // 还没有创建该玩家
		ERR_LOGIN_HASNOTPLAYER = -2013, // 还没有创建该玩家
		ERR_LOGIN_PLAYER_DATA_ERR = -2014, // 玩家数据错误
		ERECONNECT_PLAYER_NULL = -2015,//连接game时,player为null;
		ERECONNECT_SESSION_FAIL = -2016,//连接game时,session认证失败;
		ERECONNECT_PLAYERSTATE_ERR = -2017,//连接game时,玩家状态不对;
		ERR_LOGIN_GAMESERVER_NOT_START = -2018, // 服务器还未启动完成
		ERR_LOGIN_TIME_OUT = -2019,	// 登陆超时了，请从新登陆
		ERR_SERVERCFG_ERR = -2020, // 服务器配置错误
		ERR_LOGIN_FIRST_LOGIN_LUA_ERR = -2021, // 首次登陆数据初始化错误

		ERR_PRODUCT_NOT_OPEN = -9002,		// -- 物品没开放
		ERR_NOT_ENOUGH_DIAMOND = -9008, // 您的钻石数量不足！
		ERR_NAME_HAS_SPEC_USE_OTHER = -9125,//对不起，该昵称包含特殊字符，请使用其他昵称！
		ERR_NAME_USED_PLEASE_CHANGE = -9126, //对不起，该昵称已经被注册，请使用其他昵称！

		ERR_OP_REPEAT = -9191, // 操作频繁，请稍后操作
		//------------------------------------------------

		EGETITEM_NOTICE = -10000,//个人道具获得----恭喜你获得XXX
		EGETITEM_SYS_NOTICE = -10001,//系统提示获得道具-----恭喜XXX获得XXX
		EGETITEM_NUMERICAL = -10002,//个人获得数值类道具，-----恭喜您获得XXX个XXX
		EUNION_DONATION_GOLD = -10003, // 您进行了公会金币捐献
		EUNION_DONATION_DIAMOND = -10004,//您进行了公会钻石捐献
		EDUNGEON_GENERAL_PUSH = -10005, // 恭喜您通关冒险普通第XXX章
		EDUNGEON_ELITE_PUSH = -10006, // 恭喜您通关冒险精英第XXX章
		EMOBA_1V1_WIN = -10007,//恭喜您竞技场1V1中获胜
		EMOBA_3V3_WIN = -10008,//恭喜您竞技场3V3中获胜
		EMOBA_5V5_WIN = -10009,//恭喜您竞技场5V5中获胜
		EEVENT_DUNGEON_PUSH = -10010, // 恭喜您在XXX中通关XXX难度
		EEXPEDITION_DUNGEON_PUSH = -10011,//恭喜您在英雄远征中达到第XXX关

		ETRIAL_DUNGEON_PUSH = -10012,//恭喜您无尽试炼达到第XXX层
		ETHRONE_DUNGEON_PUSH = -10013,//恭喜您永夜王座达到第XXX层
		EWORLDBOSS_DUNGEON_PUSH = -10014,//恭喜您在XXX中对boss造成XXX伤害
		EFRIEND_ADD_FRIEND = -10015,//XXX申请加您为好友
		EGETITEM_RUNES_GIFT_SYS = -10016,//恭喜XXX通过战纹礼包获得XXX
		EGETITEM_HERO_SKIN_SYS = -10017,//恭喜XXX获得XXX皮肤
		EGETITEM_GIVE_HEROSKIN_SYS = -10018,//恭喜XXX获得XXX赠送的XXX
		EGETITEM_EQUIPSUIT_SYS = -10019,//恭喜XXX锻造成功，获得XXX套装武器XXX
		EDUNGEON_GENERAL_PUSH_SYS = -10020, // XXX经过不懈努力，满星通关冒险普通第XXX章
		EDUNGEON_ELITE_PUSH_SYS = -10021, // XXX经过不懈努力，满星通关冒险精英第XXX章
		EEVENT_DUNGEON_PUSH_SYS = -10022, // XXX经过不懈努力，XXX通关XXX模式
		EEXPEDITION_DUNGEON_PUSH_SYS = -10023,//恭喜XXX经过不懈努力，通关英雄远征
		ETRIAL_DUNGEON_PUSH_SYS = -10024,//恭喜XXX经过不懈努力，在无尽试炼成功到达XXX层
		ETHRONE_DUNGEON_PUSH_SYS = -10025,//恭喜XXX经过不懈努力，在永夜王座成功到达XXX层
		

		// 好友相关错误码
		EFRIEND_ADD_SELF_ERR	=	-11000, // 您要添加自己为好友？
		EFRIEND_EXITS_FRIEND	=	-11001,	// 对方已经是您的好友了吧！
		EFRIEND_FRIEND_NUM_MAX	=	-11002,	// 您的好友数量已达到上限！
		EFRIEND_FRIEND_INVITEE_NUM_MAX = -11003,	// 您的好友邀请数量已达到上限！
		EFRIEND_EXITS_FRIEND_INVITEE = -11004,	// 对方已经在你的好友邀请列表中了
		EFRIEND_DEST_INVITER_NUM_MAX = -11005,	// 对方的好友申请列表已满
		EFRIEND_DEST_NOT_YOU_FRIEND	= -11006,	// 您删除的好友不存在
		EFRIEND_DEST_NOT_YOU_BLACK = -11007,	// 您删除的黑名单不存在
		EFRIEND_DEST_NOT_YOU_STRANGER = -11008,	// 您删除的陌生人不存在
		EFRIEND_DEST_NOT_YOU_INVITER = -11009,	// 您删除的申请列表不存在
		EFRIEND_DEST_NOT_YOU_INVITEE = -11010,	// 您删除的邀请列表不存在
		EFRIEND_DEST_FRIEND_NUM_MAX = -11011,	// 对方的好友数量已达到上限！
		EFRIEND_EXITS_BLACK = -11012,	// 对方已经是您的黑名单了吧！
		EFRIEND_IS_SEND = -11013,	// 今天已经送过了
		EFRIEND_IS_GET = -11014,	// 今天领取已经到达上限
		EFRIEND_IS_GET_NULL = -11015,	// 对方没有送你鸡腿，不能领取
		EFRIEND_CAN_GET = -11016,		// 没有可以领取的鸡腿
		EFRIEND_SYS_ERR = -11017,		// 找不到玩家的数据


		//公会
		ERR_NAME_REPEAT = -13001, //该公会名称已注册，请重新输入！
		ERR_PLEASE_EXIT_UNION_OPER_AGAIN = -13002, //您已经加入公会，请退会后再进行该操作！
		ERR_CREATE_UNION_COND_FAIL = -13003, //创建公会失败！
		ERR_NOT_JOINED_UNION = -13004, //您还没有加入公会吧！
		ERR_NOT_ENOUGH_UNION_SCOPE = -13005, //您的公会权限不足！
		ERR_IS_LIMIT_MEMBERS = -13006, //公会人数已达到最大！
		ERR_JOINED_OTHER_UNION = -13007, //对方已加入了其他公会！
		ERR_NOT_YOUR_UNION_MEMBER = -13008, //对方不是您公会的吧！
		ERR_NOT_FOUND_VALID_UNION_INFO = -13009, //未查询到合适的公会信息！
		ERR_GOT_UNION_INFO_FAIL = -13010, //获取公会捐献信息失败！
		ERR_UNION_CONTRIBUTION_TO_LIMIT = -13011, //公会日贡献金币次数已达最大！
		ERR_GOT_UNION_DONATE_FAIL = -13012, //获取公会捐献信息失败！
		ERR_NOT_ENOUGH_UNION_EXP = -13013, //公会经验不足！
		ERR_UNION_COIN_NOT_ENOUGH = -13014, //您当前的公会币数量不足！
		ERR_UNION_HAS = -13015, //已经有工会.
		ERR_UNION_HAS_YET = -13016, //您已经加入公会了吧！
		ERR_UNION_REPLY_OFFER_THIS = -13017, //您已经向该公会发送过申请！
		ERR_UNION_OUT_FIRST_CHANGE_YOUR_ROLE = -13018, //您不能退出公会，请改变身份后再进行该操作！
		ERR_UNION_NOT_EMEBER = -13019, //您不是该公会的成员吧！
		INFO_UNION_CREATE_CONGI = -13020, //恭喜XXX成功创建XXX公会。
		ERR_CREATE_UNION_DIAMOND_LESS = -13021,//创建公会的时候钻石不足
		ERR_CREATE_UNION_CONSUME_DIAMOND_ERR = -13022,//创建公会时消耗钻石出错
		ERR_GUILD_NOT_EXIST = -13023, //申请入会的时候，该工会不存在
		ERR_GUILD_APPLY_FULL = -13024,//该工会申请人数已满
		ERR_GUILD_OPERATOR_ERR = -13025,//操作类型错误
		ERR_GUILD_NO_APPLY = -13026, // 对方没有申请加入你的工会
		ERR_GUILD_ROLE_NOT_FIND = -13027,//找不到对方的信息
		ERR_GUILD_NOT_ENOUGH_GOLD = -13028,//金币不足
		ERR_GUILD_NOT_ENOUGH_DIAMOND = -13029,//钻石不足
		ERR_GUILD_DONATION_TYPE_ERR = -13030,//公会捐献时类型不对
		ERR_GUILD_CANT_FIND_GUILD = -13031,//找不到该工会
		ERR_GUILD_NOT_IN_APPLY = -13032,//您还没有申请加入该工会，不能取消
		ERR_GUILD_APPLY_LEVEL_LESS = -13033,//您的等级不足，不能申请该工会
		ERR_GUILD_PLAYERINFO_ERR = -13034,//角色数据错误
		ERR_GUILD_JOIN_UNION_CD = -13035,//您当前在加入公会CD中
		ERR_GUILD_CANT_DISBAND = -13036, //公会中还有别人，不能解散
		ERR_GUILD_MEMBER_MUST_ONLINE = -13037, //对方必须在线
		ERR_GUILD_CHANGE_SELF_POS = -13038, //不能对自己进行任命
		ERR_GUILD_KICK_SELF = -13039,	//不能把自己踢出工会

		ERR_GUILD_BOSS_ISNOTOPEN = -13040,//公会boss活动还没有开启
		ERR_GUILD_BOSS_ISDIE = -13041,//公会boss已经被打死了
		ERR_GUILD_COUNT_LESS = -13042,//活动次数已经用完
		ERR_GUILD_OTHER_JOIN_UNION_CD = -13043,//对方当前在加入公会CD中
		ERR_GUILD_OTHER_JOIN_LV_LESS = -13044,//对方等级不足，不能加入公会
		ERR_GUILD_UNION_ACTIVITY_CFG_ERR = -13045,//公会活动配置错误
		ERR_GUILD_UNION_SENDREPACKET_DIAMOND_ERR = -13046,//红钻不足，无法发送红包


		//队伍错误码
		ETEAM_IN_TEAM = -33000,	//已经在队伍中了
		ETEAM_CREATE_TEAM_FAILD = -33001, //创建队伍失败
		ETEAM_TEAM_IS_FULL = -33002,//队伍已满员
		ETEAM_JOIN_DISSOLVED = -33003, //该队伍已解散
		ETEAM_JOIN_TEAM_AFC_LESS = -33004,//加入时战斗力不足
		ETEAM_DISSOLVED = -33005,//该队伍已解散
		ETEAM_NOT_IN_TEAM = -33006,//您不在队伍中
		ETEAM_NOT_RIGHT_PARAM = -33007,//参数错误
		ETEAM_NO_AUTHORITY = -33008,//您不是队长，没有权利这么做
		ETEAM_ROLE_NOT_FOUND = -33009,//您不在队伍中
		ETEAM_NO_INVITE_TIMEOUT = -33010,//该邀请已经过时了
		ETEAM_APPLY_MEMBER_IS_TEAM = -33011,//队长同意时对方已经有队伍了
		EIEAM_APPLY_MEMBER_IS_NOTONLINE = -33012,//队长同意时对方已经离线了
		ETEAM_JOIN_TEAM_PASSWD_ERR = -33013,//加入时密码不对
		ETEAM_FORMATION_HERO_SIZE_ERR = -33014,//布阵英雄数量不对
		ETEAM_ENTER_TEAM_DUNGEON_HAS_NO_TEAM = -33015,//您还没有队伍
		ETEAM_ENTER_TEAM_DUNGEON_MEMBER_LESS = -33016,//最少要3个人才能进入副本
		ETEAM_DUNGEON_IS_NOT_OPEN = -33017,//队伍副本活动未开启
		ETEAM_DUNGEON_PLAYER_NOT_ONLINE = -33018,//有成员未在线
		ETEAM_DUNGEON_ACTIVITY_CFG_ERR = -33019,//组队boss活动配置错误
		ETEAM_DUNGEON_PLAYER_ACT_COUNT_LESS = -33020,//有成员活动次数不足
		ETEAM_DUNGEON_PLAYER_NOT_SQUARE = -33021,//有成员未布阵
		ETEAM_FORMATION_HAS_NO_HERO = -33022,//布阵的时候没有该英雄
		ETEAM_NOT_SQUARE_CANT_PREPARE = -33023,//您还没有布阵，不能准备
		ETEAM_CANT_INVITE_NOT_CAPTIAN = -33024,//您不是队长，不能邀请
		ETEAM_BE_KICKED_OUT_TEAM = -33025,//您被踢出队伍
		ETEAM_DUNGEON_PLAYER_NOT_ONLINE_TEAM = -33026,//{0}成员未在线，不能进入副本
		ETEAM_DUNGEON_PLAYER_ACT_COUNT_LESS_TEAM = -33027,//{0}成员活动次数不足,不能进入副本
		ETEAM_DUNGEON_PLAYER_NOT_SQUARE_TEAM = -33028,//{0}成员未布阵,不能进入副本
		ETEAM_DUNGEON_PLAYER_NOT_PARPARE_TEAM = -33029,//{0}成员未准备,不能进入副本
		ETEAM_CREATE_ERR_ACTIVITY_COUNT_LESS = -33030,//创建队伍的时候活动次数不足
		ETEAM_CREATE_ERR_ACTIVITY_ID_ERR = -33031,//创建队伍的时候活动ID设置不对
		ETEAM_JOIN_ERR_ACTIVITY_ID_ERR = -33032,//加入队伍的时候该队伍活动ID设置不对
		ETEAM_JOIN_ERR_ACTIVITY_COUNT_LESS = -33033,//加入队伍的时候活动次数不足
		ETEAM_JOIN_ERR_IN_DUNGEON = -33034,//加入队伍的时候该队伍在战斗中
	};
};

#endif